<?php session_start(); ?>
<?php date_default_timezone_set('Europe/Belgrade'); ?>
<?php ini_set('max_execution_time', 300); ?>

<?php include("components/autoload.php"); ?>
<?php include("components/functions.php"); ?>
<?php include("components/connection.php"); ?>
<?php $settings = new Settings(); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php include("components/titles.php"); ?>
<meta name="description" content="BasketLiga is an amateur basketball competition in Serbia." />
<meta name="keywords" content="BasketLiga, basketball competition, serbia, Srbija" />
<?php include("components/ogPicture.php"); ?>

<base href="<?php echo $settings->base; ?>" />

<!-- styles -->
<link href="template/css/fonts.css" type="text/css" rel="stylesheet" media="all" />
<link href="template/css/main.css" type="text/css" rel="stylesheet" media="all" />
<link href="template/css/menu.css" type="text/css" rel="stylesheet" media="all" />
<link href="template/css/content.css" type="text/css" rel="stylesheet" media="all" />
<link href="template/css/footer.css" type="text/css" rel="stylesheet" media="all" />
<link href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" type="text/css" rel="stylesheet" media="all" />

<?php include("components/stilovi.php"); ?>

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> 

<!-- scripts -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js" type="text/javascript"></script>
<script src="template/js/main.js"></script>

<script src="template/js/ajax.js" type="text/javascript"></script>
<script src="template/gallery/js/jquery.blockUI.js" type="text/javascript"></script>
<script src="template/gallery/js/jquery.history.js" type="text/javascript"></script>
<script src="template/gallery/js/jquery.slimbox2.js" type="text/javascript"></script>
<script src="template/gallery/js/pwi-1.0.js" type="text/javascript"></script>
<script src="template/js/jquery.dataTables.min.js" type="text/javascript"></script>

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-37332646-1']);
  _gaq.push(['_setDomainName', 'basketliganis.org']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
	var pluginUrl = '//www.google-analytics.com/plugins/ga/inpage_linkid.js'; _gaq.push(['_require', 'inpage_linkid', pluginUrl]);
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<meta property="fb:app_id" content="531810463510287"/>  
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=531810463510287";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>
	$(document).ready(function() {
		kulTekst();
	});
</script>


</head>

<body>

	<div id="top">
    	<div class="holder">
        	<div id="logo">
            	<a href="<?php echo $settings->base; ?>"><img src="template/images/logo.png" /></a>
            </div><!-- enf of #logo -->
            <div id="top_banner">
            </div>
        </div><!-- enf of .holder -->
    </div><!-- end of #top -->

	<div id="menu">
    	<div class="holder">
        <?php include ("components/menu.php")?>
        </div><!-- enf of .holder -->
    </div><!-- end of #menu -->

	<div id="middle">
    	<div class="holder">
        <div id="page">
        


        	<div class="fullPageBox">
            	<div id="coolText">
                    <p><span>10</span> <span>Teams</span></p>
                    <p><span>80</span> <span>Players</span></p>
                    <p><span>45</span> <span>Games</span></p>
                    <p><span>9</span> <span>Weeks</span></p>
                    <p><span>1</span> <span>Winner</span></p>
                    <p><span>BasketLiga</span> <span>2013</span></p>
                </div>

            	<img src="template/images/slider_slika.png" />
                
                <div class="clear"></div>
            </div><!-- end of slideshow -->
            
            <div id="blPartners">
        	<div class="holder">
	            <a target="_blank" href="http://www.facebook.com/pages/Bilijar-klub-Leonhart/104939179568713"><img src="media/partners/leonhart.jpg" /></a>
	            <a target="_blank" href="http://www.jedinstveni-sindikat.org.rs/"><img src="media/partners/sindikat.png" /></a>
            </div><!-- end of partners -->
                <div class="clear"></div>
            </div>







<?php
try {
	$page = "home";
	if (isset($_GET['page']))
		$page = $_GET['page'];										// loading the page
		
	if (file_exists("pages/" . $page . ".php")) {
		include("pages/" . $page . ".php");
	}
	else {
		throw new Exception("This page doesn't exist!");
	}
}
catch(Exception $e) {
	echo "Exception appeared: ", $e->getMessage(), "\n";
}
?>










		</div>
        </div><!-- enf of .holder -->
    </div><!-- end of #middle -->

	<div id="footer">
    	<div class="holder">
        	<div class="footerLine"></div>
        	<div class="footerContent"></div>
        	<div class="footerLine"></div>
        </div><!-- enf of .holder -->
    </div><!-- end of #footer -->

</body>
</html>